from django.contrib.auth.forms import UserCreationForm
#from django.forms import ModelForm
from django import forms
from .models import UserProfile
from django.contrib.auth.models import User
from django.db import models
from django.forms.models import fields_for_model , ChoiceField , HiddenInput


class ContactForm(forms.Form):
    FirstName = forms.CharField(widget=forms.TextInput(), required=True)
    Email = forms.EmailField(widget=forms.TextInput(), required=True)
    Text = forms.CharField(widget=forms.Textarea(), required=True)
    
    def send_email(self):
        # send email using the self.cleaned_data dictionary
        pass
    
    
class LoginForm(forms.Form):
    username = forms.CharField(widget=forms.TextInput())
    password = forms.CharField(widget=forms.PasswordInput(render_value=False))
    
    
class RegisterForm(UserCreationForm):
        
    address = forms.CharField( max_length=30)
    addressSend = forms.CharField()
    telephone = forms.IntegerField()
    mobilePhone = forms.IntegerField()
    
    

    class Meta:
        model=User
        fields=("first_name", "last_name", "email", "username")
    

    